<!DOCTYPE html>
<html lang="en">
<head>
    <script src="js/global_data.js"></script>
    <!-- 以下为bootstrap和jquery相关依赖-->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="bootstrap/js/jquery-3.4.1.min.js"></script>
    <!-- *************************************************************up-up-->

    <link rel="stylesheet" href="backstage/lib/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/matchResult.css">
    <script src="js/matchResult.js"></script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>比赛结果查看</title>
</head>

<body>
<div class="container-fluid row">
    <div class="col-md-2"></div>
    <div class="col-md-8">
        <div id="mainTitle">
            <h3>比赛结果</h3>
        </div>
        <h4 style="text-align: center;color: red;">说明：为了节约时间，如若比赛双方战成平手，将采用随机数来决定胜负！感谢你的理解！</h4>
        <div id="mainBox">
            <div id="mainBox-head">
                <div class="mainBoxHead-rank">
                    <p class="mainBoxHead-firstOne">暂无信息</p>
                    <p class="mainBoxHead-secondOne">暂无信息</p>
                    <p class="mainBoxHead-thirdOne">暂无信息</p>
                </div>
            </div>
            <div class="row-line"></div>
            <div id="mainBox-value">
                <div style="width: 100%;">
                    <!-- 以下内容需要动态加载-->
                </div>

            </div>
        </div>
    </div>
</div>

<div id="detailBox" hidden="hidden">
    <p></p>
    <div>
        <img src="icon/close.png">
        <table class="table table-bordered" id="loadData" style="margin-top: 30px;">
            <!-- 以下内容需要动态加载-->
        </table>
    </div>
</div>

<!-- 复盘棋盘弹出层代码-->
<div id="cheerReplay" hidden="hidden">
    <div class="well">

        <h3>该步耗时:&nbsp;<span style='color: rgb(131,196,119)' id="runTime"></span>&nbsp;ms</h3>
        <hr width="100%"/>
        <img src="backstage/img/qipan.jpg" width="400px" height="400px" style="border-radius: 10px">
        <hr width="100%"/>
        <a href="javascript:leftStep()"><i class="fa fa-arrow-left fa-3x" style="float:left; left: 100px;position: absolute;height: 50px;"></i></a>
        <button onclick='closeBackCheer()' class="btn btn-info" style="background-color: rgb(51,51,51);color: white;border-color: rgb(51,51,51);border-radius: 7px;margin-top: 5px;">关闭</button>
        <a href="javascript:rightStep()"><i class="fa fa-arrow-right fa-3x" style="float:right;right: 100px;position: absolute;height: 50px;"></i></a>

    </div>
</div>
<!-- ************弹出层end*******************-->

</body>
</html>
<script>
    // 判断用户有没有登录信息，没有的话自动登录跳转到登录页面
    $.ajax({
        async: false,
        type: "post",
        data:'{"userToken":"'+localStorage.getItem("userToken")+'"}',
        url: serverIpAddress+"User/LodeUserMessage",
        contentType: "application/json;charset=utf-8",
        dataType: "json",
        error:function () {
            window.location="login.html";
        }
    });

    let postId = window.location.search;
    let match = {};
    postId = postId.substring(postId.indexOf("=")+1);
    $.ajax({
        async: false,
        data: postId,
        type: "post",
        url: serverIpAddress+"Match/toMatchResult",
        contentType: "application/text;charset=utf-8",
        dataType: "json",
        success: function (res) {
            match = res;
        }
    });
</script>

